#include "normalRenderTestCmd.h"
#include "glutContextTestCmd.h"
#include "glutZoharlCmd.h"
#include "openglToFileCmd.h"
#include <maya/MFnPlugin.h>


MStatus initializePlugin( MObject obj )
{
	MStatus stat;
	MFnPlugin plugin(obj,"Maitreya","2012","Any");

	stat=plugin.registerCommand("normalRenderTest",normalRender::creator);
	if(!stat) stat.perror("register command normalRender failed");

	stat=plugin.registerCommand("glutTest", cmdGlutContext::creator);
	if(!stat) stat.perror("register command glutTest failed");

	stat=plugin.registerCommand("glutZoharl", cmdGlutZoharl::creator);
	if(!stat) stat.perror("register command glutTest failed");

	stat=plugin.registerCommand("toFile", openglToFile::creator);
	if(!stat) stat.perror("register command toFile failed");

	return stat;

}

MStatus uninitializePlugin(MObject obj)
{
	MStatus stat;
	MFnPlugin plugin(obj);

	stat=plugin.deregisterCommand("normalRenderTest");
	if(!stat) stat.perror("deregister command normalRender failed");

	stat=plugin.deregisterCommand("glutTest");
	if(!stat) stat.perror("deregister command glutTest failed");

	stat=plugin.deregisterCommand("glutZoharl");
	if(!stat) stat.perror("deregister command glutTest failed");

	stat=plugin.deregisterCommand("toFile");
	if(!stat) stat.perror("deregister command glutTest failed");

	return stat;
}